package com.example.debt_v1.controller;

import com.example.debt_v1.pojo.Debt;
import com.example.debt_v1.service.DebtService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Guo Chen
 * @date 2022年04月19日 20:27
 */
@RestController("/debt")
public class DebtController {
    @Autowired
    private DebtService debtService;

    @GetMapping("/getAllDebt")
    public List<Debt>getAllDebt(){
        return debtService.getAllDebt();
    }
}
